#pragma once

#include "KLine.h"
#include <vector>

#include "MACD.h"

float minPrice(float* price, int start, int end);

float maxPrice(float* price, int start, int end);

float* RSI(int dataLen, float* close, int N);

float* RSI(vector<KLine*>* kLines, int N);

float* MA(int dataLen, int N, float* price);

float* EMA(int dataLen, float* price, int N);

float maxMADif(float* MAS, float* MAL, int start, int end);

MACD* calculateMACD(int dataLen, float* price, int shortCycle, int longCycle, int EMACycle);

MACD* calculateMACD2(int dataLen, float* EMAS, float* EMAL, int shortCycle, int longCycle, int EMACycle);

bool* isFallEnd(int dataLen, float* high, float* close, float* low);

bool* isRiseEnd(int dataLen, float* high, float* close, float* low);

bool* isFallEnd(int dataLen, float* high, float* close, float* low, float* rsi, MACD* macd);

bool* isRiseEnd(int dataLen, float* high, float* close, float* low, float* rsi, MACD* macd);